package cuit.cx.groupcomment.dao.impl;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import cuit.cx.groupcomment.dao.SerialDAO;
import cuit.cx.groupcomment.model.Serial;

public class SerialDAOImpl extends SqlMapClientDaoSupport implements SerialDAO
{
    public SerialDAOImpl() {
        super();
    }

    public void addSerial(Serial record) {
        getSqlMapClientTemplate().insert("addSerial", record);
    }


    public int updateSerial(Serial record) {
        int rows = getSqlMapClientTemplate().update("updateSerial", record);
        return rows;
    }

   
    public Serial findSerialById(Integer id) 
    {
        Serial record = (Serial) getSqlMapClientTemplate().queryForObject("getSerialById", id);
        return record;
    }

   
    public int deleteSerial(Integer id) 
    {
        int rows = getSqlMapClientTemplate().delete("delBySerialById", id);
        return rows;
    }

  
}